{{ $stableRelease := index $.Site.Data.releases.stable }}
{{ $preRelease := index $.Site.Data.releases.prerelease }}
{{ $stableTool := index $stableRelease.downloads (.Get "toolname") }}
{{ $prerelaseTool := index $preRelease.downloads (.Get "toolname") }}

<h2>Download</h2>
<p>
    The latest stable {{ .Get "name" }} version is {{ $stableTool.version }}, released on {{ $stableRelease.date }}.
</p>
<p>
    <a class="btn btn-primary" href="{{ $stableTool.urls.zip }}"><i class="fas fa-download"></i> Download stable release v{{ $stableTool.version }}</a>
</p>
<p>
    The latest prerelease is v{{ $prerelaseTool.version }}, built on {{ $preRelease.date }}.
</p>
<p>
    <a class="btn btn-danger" href="{{ $prerelaseTool.urls.zip }}"><i class="fas fa-download"></i> Download prerelease build v{{ $prerelaseTool.version }}</a>
</p>

<h2>Documentation</h2>

<p>
    The {{ .Get "name" }} documentation can also be downloaded.
</p>
<p>
    <a class="btn btn-secondary" href="/docs/{{ .Get "doc" }}.pdf"><i class="fas fa-file-pdf"></i> Download / view documentation (PDF format)</a>
</p>
